package com.tutu.starter.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Program: springboot_project
 * @Description:
 * @Author: JK.TuTu
 * @Create: 2022-10-15 19:59
 **/
@Data
@Component
//@ConfigurationProperties可以将springboot中配置文件的值绑定到实体类的属性中  prefix指定需要绑定的配置文件的key
@ConfigurationProperties(prefix = "mycar")
public class Car {
    private String band;

    private Integer price;
}
